

<!DOCTYPE html>
<html lang="en" data-default-color-scheme=&#34;auto&#34;>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/img/favicon.png">
  <link rel="icon" href="/img/favicon.png">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  
    <meta name="description" content="">
  
  <meta name="author" content="John Doe">
  <meta name="keywords" content="">
  
  <title>Hexo</title>

  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" />


  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/github-markdown-css@4.0.0/github-markdown.min.css" />
  <link  rel="stylesheet" href="/lib/hint/hint.min.css" />

  
    
    
      
      <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@10.4.0/styles/github-gist.min.css" />
    
  

  
    <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
  



<!-- 主题依赖的图标库，不要自行修改 -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_ba1fz6golrf.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_kmeydafke9r.css">


<link  rel="stylesheet" href="/css/main.css" />

<!-- 自定义样式保持在最底部 -->


  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    var CONFIG = {"hostname":"example.com","root":"/","version":"1.8.8","typing":{"enable":true,"typeSpeed":70,"cursorChar":"_","loop":false},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"right","visible":"hover","icon":""},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":false,"trickleSpeed":100}},"copy_btn":true,"image_zoom":{"enable":true},"toc":{"enable":true,"headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"lazyload":{"enable":true,"onlypost":false},"web_analytics":{"enable":false,"baidu":null,"google":null,"gtag":null,"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":null,"leancloud":{"app_id":null,"app_key":null,"server_url":null}}};
  </script>
  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
<meta name="generator" content="Hexo 5.4.0"></head>


<body>
  <header style="height: 70vh;">
    <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand"
       href="/">&nbsp;<strong>Fluid</strong>&nbsp;</a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/">
                <i class="iconfont icon-home-fill"></i>
                Home
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/">
                <i class="iconfont icon-archive-fill"></i>
                Archives
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/">
                <i class="iconfont icon-category-fill"></i>
                Categories
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/">
                <i class="iconfont icon-tags-fill"></i>
                Tags
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/">
                <i class="iconfont icon-user-fill"></i>
                About
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" data-toggle="modal" data-target="#modalSearch">&nbsp;<i
                class="iconfont icon-search"></i>&nbsp;</a>
          </li>
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" href="javascript:">&nbsp;<i
                class="iconfont icon-dark" id="color-toggle-icon"></i>&nbsp;</a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

    <div class="banner" id="banner" parallax=true
         style="background: url('/img/default.png') no-repeat center center;
           background-size: cover;">
      <div class="full-bg-img">
        <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
          <div class="page-header text-center fade-in-up">
            <span class="h2" id="subtitle" title="">
              
            </span>

            
              <div class="mt-3">
  
  
    <span class="post-meta">
      <i class="iconfont icon-date-fill" aria-hidden="true"></i>
      <time datetime="2021-03-07 18:03" pubdate>
        March 7, 2021 pm
      </time>
    </span>
  
</div>

<div class="mt-1">
  
    
    <span class="post-meta mr-2">
      <i class="iconfont icon-chart"></i>
      1.1k 字
    </span>
  

  
    
    <span class="post-meta mr-2">
      <i class="iconfont icon-clock-fill"></i>
      
      
      13
       分钟
    </span>
  

  
  
</div>

            
          </div>

          
        </div>
      </div>
    </div>
  </header>

  <main>
    
      

<div class="container-fluid nopadding-x">
  <div class="row nomargin-x">
    <div class="d-none d-lg-block col-lg-2"></div>
    <div class="col-lg-8 nopadding-x-md">
      <div class="container nopadding-x-md" id="board-ctn">
        <div class="py-5" id="board">
          <article class="post-content mx-auto">
            <!-- SEO header -->
            <h1 style="display: none"></h1>
            
            <div class="markdown-body">
              <h1 id="HEXO框架搭建个人博客"><a href="#HEXO框架搭建个人博客" class="headerlink" title="HEXO框架搭建个人博客"></a>HEXO框架搭建个人博客</h1><h2 id="一、-环境搭建"><a href="#一、-环境搭建" class="headerlink" title="一、 环境搭建"></a>一、 环境搭建</h2><h3 id="1-nodejs安装"><a href="#1-nodejs安装" class="headerlink" title="1. nodejs安装"></a>1. nodejs安装</h3><h4 id="1-1-下载"><a href="#1-1-下载" class="headerlink" title="1.1 下载"></a>1.1 下载</h4><p>下载地址（选择<strong>LTS</strong>稳定版）：<a target="_blank" rel="noopener" href="https://nodejs.org/en/">https://nodejs.org/en/</a></p>
<blockquote>
<p>下载之后直接默认安装，一路next（建议不要放在C盘）</p>
</blockquote>
<h4 id="1-2-测试nodejs"><a href="#1-2-测试nodejs" class="headerlink" title="1.2 测试nodejs"></a>1.2 测试nodejs</h4><p>打开windows的命令行工具输入</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">node -v<br></code></pre></td></tr></table></figure>

<p>显示版本号则安装成功</p>
<p><img src="https://cdn.jsdelivr.net/gh/LihengXu/mycdn/img/hexo%E6%90%AD%E5%BB%BA_1_%E6%B5%8B%E8%AF%95nodejs%E5%AE%89%E8%A3%85%E6%88%90%E5%8A%9F.png" srcset="/img/loading.gif"></p>
<h4 id="1-3-测试npm"><a href="#1-3-测试npm" class="headerlink" title="1.3 测试npm"></a>1.3 测试npm</h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs shell"><span class="hljs-meta">#</span><span class="bash"> npm是nodejs安装时默认安装的</span><br><span class="hljs-meta">#</span><span class="bash"> 直接在windows的命令行工具输入</span><br>npm -v<br></code></pre></td></tr></table></figure>

<p>显示如下则安装成功, npm管理工具用于安装Hexo框架</p>
<p><img src="https://cdn.jsdelivr.net/gh/LihengXu/mycdn/img/hexo%E6%90%AD%E5%BB%BA_2_%E6%B5%8B%E8%AF%95npm%E5%AE%89%E8%A3%85%E6%88%90%E5%8A%9F.png" srcset="/img/loading.gif"></p>
<h4 id="1-4-安装nrm（需要一点耐心）"><a href="#1-4-安装nrm（需要一点耐心）" class="headerlink" title="1.4 安装nrm（需要一点耐心）"></a>1.4 安装nrm（需要一点耐心）</h4><blockquote>
<p> nrm的安装原因：需要切换下载源到国内镜像源，提升下载速度</p>
</blockquote>
<ul>
<li>默认npm的全局安装路径在C盘，我们需要修改到nodejs的安装目录，新建两个文件夹: <code>node_global_modules</code> 和 <code>node_cache</code></li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/LihengXu/mycdn/img/hexo%E6%90%AD%E5%BB%BA_3_%E4%BF%AE%E6%94%B9npm%E9%BB%98%E8%AE%A4%E5%85%A8%E5%B1%80%E8%B7%AF%E5%BE%84.png" srcset="/img/loading.gif"></p>
<ul>
<li><p>在命令行执行以下两条命令修改npm配置</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs shell">npm config set prefix &quot;D:\Java\nodejs\node_modules\npm\node_global_modules&quot;<br>npm config set cache &quot;D:\Java\nodejs\node_modules\npm\node_cache&quot;<br></code></pre></td></tr></table></figure></li>
<li><p>执行后输入以下命令，查看npm配置结果</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">npm config ls<br></code></pre></td></tr></table></figure></li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/LihengXu/mycdn/img/hexo%E6%90%AD%E5%BB%BA_4_npm%E9%BB%98%E8%AE%A4%E9%85%8D%E7%BD%AE%E6%88%90%E5%8A%9F.png" srcset="/img/loading.gif"></p>
<ul>
<li>验证配置成功后，需要配置环境变量。在环境变量中，新建一个系统变量，变量名：<code>NODE_HOME</code>，变量值：<code>D:\dev\nodejs</code>，效果如图：</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/LihengXu/mycdn/img/hexo%E6%90%AD%E5%BB%BA_5_%E6%B7%BB%E5%8A%A0%E7%B3%BB%E7%BB%9F%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8FNODE_HOME.png" srcset="/img/loading.gif"></p>
<ul>
<li><p>在系统环境变量<code>Path</code>变量名中，新建变量值：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs shell"><span class="hljs-meta">%</span><span class="bash">NODE_HOME%</span><br><span class="hljs-meta">%</span><span class="bash">NOED_HOME%\node_modules</span><br><span class="hljs-meta">%</span><span class="bash">NODE_HOME%\node_modules\npm\node_global_modules\</span><br></code></pre></td></tr></table></figure></li>
</ul>
<p>效果如图：</p>
<p><img src="https://cdn.jsdelivr.net/gh/LihengXu/mycdn/img/hexo%E6%90%AD%E5%BB%BA_6_%E6%B7%BB%E5%8A%A0%E7%B3%BB%E7%BB%9F%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E5%88%B0path.png" srcset="/img/loading.gif"></p>
<ul>
<li><p>保存后重新打开命令行工具，执行性全局安装</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">npm install nrm -g<br></code></pre></td></tr></table></figure>

<p>安装结束后如图：</p>
<p><img src="https://cdn.jsdelivr.net/gh/LihengXu/mycdn/img/hexo%E6%90%AD%E5%BB%BA_7_nrm%E5%AE%89%E8%A3%85%E7%BB%93%E6%9E%9C.png" srcset="/img/loading.gif"></p>
</li>
<li><p>在命令行输入指令查看下载源，可能会报错如下图：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">nrm ls<br></code></pre></td></tr></table></figure>

<p>![](<a target="_blank" rel="noopener" href="https://cdn.jsdelivr.net/gh/LihengXu/mycdn/img/hexo%E6%90%AD%E5%BB%BA_8_nrm">https://cdn.jsdelivr.net/gh/LihengXu/mycdn/img/hexo搭建_8_nrm</a> ls报错.png)</p>
</li>
<li><p>找到nrm目录(错误第四行)</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">at Object.&lt;anonymous&gt; (D:\Java\nodejs\node_modules\npm\node_global_modules\node_modules\nrm\cli.js:17:20)<br></code></pre></td></tr></table></figure></li>
<li><p>打开cli.js 第17行修改成</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs js"><span class="hljs-comment">//const NRMRC = path.join(process.env.HOME, &#x27;.nrmrc&#x27;); (删除)</span><br><span class="hljs-keyword">const</span> NRMRC = path.join(process.env[(process.platform == <span class="hljs-string">&#x27;win32&#x27;</span>) ? <span class="hljs-string">&#x27;USERPROFILE&#x27;</span> : <span class="hljs-string">&#x27;HOME&#x27;</span>], <span class="hljs-string">&#x27;.nrmrc&#x27;</span>);<br></code></pre></td></tr></table></figure></li>
<li><p>重新输入<code>nrm ls</code>查看下载源</p>
<p><img src="https://cdn.jsdelivr.net/gh/LihengXu/mycdn/img/hexo%E6%90%AD%E5%BB%BA_9_%E6%9F%A5%E7%9C%8Bnrm%E4%B8%8B%E8%BD%BD%E6%BA%90.png" srcset="/img/loading.gif"></p>
</li>
<li><p>修改下载源指令，推荐选择taobao</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">nrm use taobao # 选择淘宝<br></code></pre></td></tr></table></figure></li>
</ul>
<h3 id="2-安装Hexo框架"><a href="#2-安装Hexo框架" class="headerlink" title="2. 安装Hexo框架"></a>2. 安装Hexo框架</h3><h4 id="2-1-安装hexo-cli脚手架"><a href="#2-1-安装hexo-cli脚手架" class="headerlink" title="2.1 安装hexo-cli脚手架"></a>2.1 安装hexo-cli脚手架</h4><p>打开命令行输入</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">npm i -g hexo-cli<br></code></pre></td></tr></table></figure>

<p>安装成功如图：</p>
<p><img src="https://cdn.jsdelivr.net/gh/LihengXu/mycdn/img/hexo%E6%90%AD%E5%BB%BA_10_hexo-cli%E5%AE%89%E8%A3%85%E5%AE%8C%E6%88%90.png" srcset="/img/loading.gif"></p>
<h4 id="2-2-验证hexo-cli安装成功"><a href="#2-2-验证hexo-cli安装成功" class="headerlink" title="2.2 验证hexo-cli安装成功"></a>2.2 验证hexo-cli安装成功</h4><p>命令行输入测试</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">hexo -v<br></code></pre></td></tr></table></figure>

<p>结果如图：</p>
<p><img src="https://cdn.jsdelivr.net/gh/LihengXu/mycdn/img/hexo%E6%90%AD%E5%BB%BA_11_hexo-cli%E6%B5%8B%E8%AF%95%E5%AE%89%E8%A3%85.png" srcset="/img/loading.gif"></p>
<h3 id="3-安装Git"><a href="#3-安装Git" class="headerlink" title="3. 安装Git"></a>3. 安装Git</h3><p>具体可以参考我的<a target="_blank" rel="noopener" href="https://gitee.com/lihengxu/gitstudy">Git总结</a></p>
<h2 id="二、使用Hexo搭建博客"><a href="#二、使用Hexo搭建博客" class="headerlink" title="二、使用Hexo搭建博客"></a>二、使用Hexo搭建博客</h2><h3 id="1-创建项目文件夹子"><a href="#1-创建项目文件夹子" class="headerlink" title="1. 创建项目文件夹子"></a>1. 创建项目文件夹子</h3><p>在本地硬盘创建并进入项目文件夹（blog），并在该文件夹下打开命令行工具</p>
<h3 id="2-初始化blog项目"><a href="#2-初始化blog项目" class="headerlink" title="2. 初始化blog项目"></a>2. 初始化blog项目</h3><p>使用hexo命令初始化项目</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">hexo init<br></code></pre></td></tr></table></figure>

<p>初始化项目文件如图：</p>
<p><img src="https://cdn.jsdelivr.net/gh/LihengXu/mycdn/img/hexo%E6%90%AD%E5%BB%BA_12_blog%E9%A1%B9%E7%9B%AE%E5%88%9D%E5%A7%8B%E5%8C%96%E6%96%87%E4%BB%B6.png" srcset="/img/loading.gif"></p>
<h3 id="3-运行hexo服务预览博客"><a href="#3-运行hexo服务预览博客" class="headerlink" title="3. 运行hexo服务预览博客"></a>3. 运行hexo服务预览博客</h3><p>在当前路径下输入命令</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">hexo s<br></code></pre></td></tr></table></figure>

<p>命令行出现访问路径，直接点击访问即可</p>
<p>默认样式如图：</p>
<p><img src="https://cdn.jsdelivr.net/gh/LihengXu/mycdn/img/hexo%E6%90%AD%E5%BB%BA_13_hexo%E5%8D%9A%E5%AE%A2%E9%A2%84%E8%A7%88.png" srcset="/img/loading.gif"></p>
<h3 id="4-创建文章"><a href="#4-创建文章" class="headerlink" title="4. 创建文章"></a>4. 创建文章</h3><p>在当前路径下输入命令</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">hexo n &#x27;hexo test&#x27;<br></code></pre></td></tr></table></figure>

<p>回车后出现以标题命名的.md文件路径，打开该文件编辑文章内容</p>
<h3 id="5-更新文章"><a href="#5-更新文章" class="headerlink" title="5. 更新文章"></a>5. 更新文章</h3><p>命令行输入指令</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs shell">hexo clean # 清理缓存<br>hexo g # 解析生成<br>hexo s # 运行hexo服务预览博客<br></code></pre></td></tr></table></figure>





<h2 id="三、-博客部署到GitHub"><a href="#三、-博客部署到GitHub" class="headerlink" title="三、 博客部署到GitHub"></a>三、 博客部署到GitHub</h2><h3 id="1-登陆GitHub创建仓库"><a href="#1-登陆GitHub创建仓库" class="headerlink" title="1. 登陆GitHub创建仓库"></a>1. 登陆GitHub创建仓库</h3><p>创建仓库命：LihengXu.github.io (注意第一个.前面一定是账户名)</p>
<h3 id="2-在本地目录安装git部署插件"><a href="#2-在本地目录安装git部署插件" class="headerlink" title="2. 在本地目录安装git部署插件"></a>2. 在本地目录安装git部署插件</h3><p>在项目根目录下打开命令行工具输入如下</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">npm install --save hexo-deployer-git # --save 表示只在本目录下安装<br></code></pre></td></tr></table></figure>



<h3 id="3-修改项目根目录下的配置文件"><a href="#3-修改项目根目录下的配置文件" class="headerlink" title="3. 修改项目根目录下的配置文件"></a>3. 修改项目根目录下的配置文件</h3><p>找到<code>_config.yaml</code>文件</p>
<p>找到最下面的<code>deploy：type</code> 进行编辑:</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><code class="hljs yaml"><span class="hljs-comment"># Deployment</span><br><span class="hljs-comment">## Docs: https://hexo.io/docs/one-command-deployment</span><br><span class="hljs-attr">deploy:</span><br>  <span class="hljs-attr">type:</span> <span class="hljs-string">&#x27;git&#x27;</span><br>  <span class="hljs-attr">repo:</span> <span class="hljs-string">https://github.com/LihengXu/LihengXu.github.io.git</span> <br>  <span class="hljs-comment"># repo : github上创建的仓库地址</span><br>  <span class="hljs-string">branch：</span> <span class="hljs-string">master</span><br></code></pre></td></tr></table></figure>



<h3 id="4-部署到GitHub"><a href="#4-部署到GitHub" class="headerlink" title="4. 部署到GitHub"></a>4. 部署到GitHub</h3><p>项目根目录下打开命令行输入</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">hexo d<br></code></pre></td></tr></table></figure>

<p>提示你输入GitHub账户和密码后将大妈提交到GitHub仓库</p>
<p>通过<a href="LihengXu.github.io">GitHub链接</a>可访问博客</p>
<h2 id="四、-更换主题"><a href="#四、-更换主题" class="headerlink" title="四、 更换主题"></a>四、 更换主题</h2><h3 id="1-下载主题"><a href="#1-下载主题" class="headerlink" title="1. 下载主题"></a>1. 下载主题</h3><p>将主题文件下载到本地项目的<code>theme</code>文件夹</p>
<p>在本地项目根目录下打开命令行输入</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">git clone https://github.com/fluid-dev/hexo-theme-fluid.git themes/fluid<br></code></pre></td></tr></table></figure>



<h3 id="2-修改配置-config-yml"><a href="#2-修改配置-config-yml" class="headerlink" title="2. 修改配置 _config.yml"></a>2. 修改配置 _config.yml</h3><p>找到<code>#Extensions</code>项的theme</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><code class="hljs yaml"><span class="hljs-comment"># Extensions</span><br><span class="hljs-comment">## Plugins: https://hexo.io/plugins/</span><br><span class="hljs-comment">## Themes: https://hexo.io/themes/</span><br><span class="hljs-attr">theme:</span> <span class="hljs-string">fluid</span><br></code></pre></td></tr></table></figure>



<h3 id="3-更新并重新部署"><a href="#3-更新并重新部署" class="headerlink" title="3. 更新并重新部署"></a>3. 更新并重新部署</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><code class="hljs shell">hexo clean # 清理缓存<br>hexo g # 解析生成<br>hexo s # 运行hexo服务预览<br>hexo d # 部署到github<br></code></pre></td></tr></table></figure>




            </div>
            <hr>
            <div>
              <div class="post-metas mb-3">
                
                
              </div>
              
                <p class="note note-warning">
                  
                    本博客所有文章除特别声明外，均采用 <a target="_blank" href="https://creativecommons.org/licenses/by-sa/4.0/deed.zh" rel="nofollow noopener noopener">CC BY-SA 4.0 协议</a> ，转载请注明出处！
                  
                </p>
              
              
                <div class="post-prevnext">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/2021/03/07/PicGo/">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile"></span>
                        <span class="visible-mobile">Previous</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                  </article>
                </div>
              
            </div>

            
          </article>
        </div>
      </div>
    </div>
    
      <div class="d-none d-lg-block col-lg-2 toc-container" id="toc-ctn">
        <div id="toc">
  <p class="toc-header"><i class="iconfont icon-list"></i>&nbsp;TOC</p>
  <div class="toc-body" id="toc-body"></div>
</div>

      </div>
    
  </div>
</div>

<!-- Custom -->


    

    
      <a id="scroll-top-button" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">Search</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v"
                 for="local-search-input">keyword</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>
    

    
  </main>

  <footer class="text-center mt-5 py-3">
  <div class="footer-content">
     <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a> <i class="iconfont icon-love"></i> <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener"><span>Fluid</span></a> 
  </div>
  

  

  
</footer>

<!-- SCRIPTS -->

  <script  src="https://cdn.jsdelivr.net/npm/nprogress@0.2.0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/nprogress@0.2.0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":100})
    NProgress.start()
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js" ></script>
<script  src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.min.js" ></script>
<script  src="/js/debouncer.js" ></script>
<script  src="/js/events.js" ></script>
<script  src="/js/plugins.js" ></script>

<!-- Plugins -->


  
    <script  src="/js/lazyload.js" ></script>
  



  



  <script  src="https://cdn.jsdelivr.net/npm/tocbot@4.12.0/dist/tocbot.min.js" ></script>



  <script  src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js" ></script>



  <script  src="https://cdn.jsdelivr.net/npm/anchor-js@4.3.0/anchor.min.js" ></script>



  <script defer src="https://cdn.jsdelivr.net/npm/clipboard@2.0.6/dist/clipboard.min.js" ></script>






  <script  src="https://cdn.jsdelivr.net/npm/typed.js@2.0.11/lib/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var title = document.getElementById('subtitle').title;
      
      typing(title)
      
    })(window, document);
  </script>



  <script  src="/js/local-search.js" ></script>
  <script>
    (function () {
      var path = "/local-search.xml";
      $('#local-search-input').on('click', function() {
        searchFunc(path, 'local-search-input', 'local-search-result');
      });
      $('#modalSearch').on('shown.bs.modal', function() {
        $('#local-search-input').focus();
      });
    })()
  </script>















<!-- 主题的启动项 保持在最底部 -->
<script  src="/js/boot.js" ></script>



</body>
</html>
